Skip to content

Conversation

@sourcefrog
Copy link
Collaborator

I found these helpful when trying this library out on different diffs.

@sourcefrog sourcefrog changed the title Add a couple of examples Add a couple of example programs Dec 8, 2025
@sourcefrog sourcefrog requested a review from Copilot December 10, 2025 15:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds two example programs to demonstrate the library's functionality when working with different patch formats.

  • Adds reproduce.rs example that parses patches from a file or stdin and reprints them
  • Adds dump.rs example that parses patches and outputs their debug representation
  • Optimizes a test in ast.rs by replacing vec![] with an array literal

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
examples/reproduce.rs New example program that reads and reprints patches to verify parsing/formatting round-trips
examples/dump.rs New example program that displays the debug representation of parsed patches for inspection
src/ast.rs Minor optimization in test code using array literal instead of vec![] macro

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant